Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  Show  MessageBox  

 Content of Show MessageBox.ps1
MD5 Hash: 428CC1F29B9AA7BCA32BC5028ABD2BC6
Function Show-Msgbox
{
Param([string]$message=$(Throw "You must specify a message"),
[string]$button="okonly",
[string]$icon="information",
[string]$title="Message Box"
)

# Buttons: OkOnly, OkCancel, AbortRetryIgnore, YesNoCancel, YesNo, RetryCancel
# Icons: Critical, Question, Exclamation, Information

[reflection.assembly]::loadwithpartialname("microsoft.visualbasic") | Out-Null
[microsoft.visualbasic.interaction]::Msgbox($message,"$button,$icon",$title)
}

$rc=Show-Msgbox -message "Do you know what you're doing?" `
-icon "exclamation" -button "YesNoCancel" -title "Hey $env:username!!"

Switch ($rc) {

"Yes" {"I hope your resume is up to date."}
"No" {"Wise move."}
"cancel" {"When in doubt, punt."}

}

   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a